home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19970626-19970929 / 000266_news@newsmaster….columbia.edu _Sat Aug 30 14:01:08 1997.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id OAA24594
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Sat, 30 Aug 1997 14:01:07 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id OAA25643
  7.     for kermit.misc@watsun; Sat, 30 Aug 1997 14:01:07 -0400 (EDT)
  8. Path: news.columbia.edu!panix!cam-news-hub1.bbnplanet.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!newsxfer3.itd.umich.edu!oleane!calvacom!not-for-mail
  9. From: do11@calva.net (Dominique Ottello)
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Two problems with arrays in MS-DOS Kermit 3.15
  12. Date: Sat, 30 Aug 1997 17:51:34 GMT
  13. Organization: PCatHome&Me
  14. Lines: 43
  15. Message-ID: <34085a7f.81052@news.calvacom.fr>
  16. Reply-To: do11@calva.net
  17. NNTP-Posting-Host: parb18.calvacom.fr
  18. Mime-Version: 1.0
  19. Content-Type: text/plain; charset=us-ascii
  20. Content-Transfer-Encoding: 7bit
  21. X-Newsreader: Forte Agent 1.5/32.451
  22. Xref: news.columbia.edu comp.protocols.kermit.misc:7583
  23.  
  24. Sorry, I don't want to take out a season-ticket to this group but.... ;-)
  25.  
  26. I discovered two problems with arrays (\&<letter>[]) :
  27.  
  28. First : declare \&e[0] does not empty the last element.
  29.  
  30. declare \&d[5]
  31. for \%i 1 5 1 {def \&d[\%i] No}
  32. for \%i 1 5 1 {echo \%i - (\&d[\%i])}
  33. ;
  34. echo {Element 4 and 5 must be empty with declare \\&d[0]}
  35. declare \&d[0]
  36. declare \&d[5]
  37. for \%i 1 3 1 {def \&d[\%i] Ys}
  38. for \%i 1 5 1 {echo \%i - (\&d[\%i])}
  39. ;
  40. echo {Element 5 is empty with def \\&d[5]}
  41. def \&d[5]
  42. for \%i 1 5 1 {echo \%i - (\&d[\%i])}
  43.  
  44. Second : writing an empty array element into a file does very strange
  45. things and can crash the system
  46.  
  47. ; Save this into a take file myfile.tak
  48. ; Launch Kermit 3.15
  49. ; Type take myfile.tak
  50. ; and the system crash if the last element of the array is empty
  51. ;
  52. declare \&e[5]
  53. for \%i 1 4 1 {def \&e[\%i] No}
  54. open write file Test.dat
  55. write file \&e[1]\13\10
  56. write file \&e[2]\13\10
  57. write file \&e[3]\13\10
  58. write file \&e[4]\13\10
  59. write file \&e[5]\13\10
  60. close write-file
  61.  
  62. Comments please.
  63.  
  64. Best regards,
  65.  
  66. == Dominique Ottello == do11@calva.net == Paris == France ==